/*cnpm install express --save*/
/*cnpm install cors --save*/

var Express = require('express')
var cors=require('cors')
var app = new Express();
var userRouter = require('./router/user')
var employeeRouter = require('./router/basic/empoyee')
var dataDictRouter = require('./router/basic/dataDict')
var expressRouter=require('./router/basic/express')
var userRouter=require('./router/basic/user')
var platformRouter=require('./router/basic/platform')
var merchantsRouter=require('./router/basic/merchants')
var partnerRouter=require('./router/basic/partner')


app.use(cors());
app.use('/partner',partnerRouter);
app.use('/user',userRouter);
app.use('/dataDict',dataDictRouter);
app.use('/employee',employeeRouter)
app.use('/express',expressRouter)
app.use('/platform',platformRouter)
app.use('/merchants',merchantsRouter)
var server=app.listen('3000','localhost',function (req,res) {

    var host= server.address().address;
    var post=server.address().port;

    console.log('the server in running on http://%s:%s',host,post);

})
